<?php

require_once '../../vendor/Cassandra-PHP-Client-Library/Cassandra.php';

$keyspace = 'MyAlcohoList';

$servers = array(
		array(
				'host' => 'localhost',
				'port' => 9160,
				'use-framed-transport' => true,
				'send-timeout-ms' => 1000,
				'receive-timeout-ms' => 1000
		)
);

$cassandra = Cassandra::createInstance($servers);

$cassandra->setMaxCallRetries(5);

/*    // at any point in code, you can get the named singleton instance, the name
    // again defaults to "main" so no need to define it if using single instance
$cassandra2 = Cassandra::getInstance();

*/
$cassandra->createKeyspace($keyspace);
$cassandra->useKeyspace($keyspace);


/* drink_flavor_type_name,drink_type_name,drink_brand_name,drink_company_name,drink_company_desc,
 * liquid_color_type_name,liquid_color_is_transparent,calories_for_100g,alcohol_by_volume,alcohol_by_proof_us,
 * alcohol_by_proof_uk
 */
$cassandra->createColumnFamily($keyspace,'drink_flavor');

/* drink_flavor_type_name */
$cassandra->createColumnFamily($keyspace,'drink_flavor_type');
/* drink_type_name,drink_brand_name,drink_company_name */
$cassandra->createColumnFamily($keyspace, 'drink');
/* drink_type_name */
$cassandra->createColumnFamily($keyspace,'drink_type');
/* drink_brand_name,drink_company_name */
$cassandra->createColumnFamily($keyspace,'drink_brand');
/* drink_company_name,drink_company_desc */
$cassandra->createColumnFamily($keyspace,'drink_company');
/* liquid_color_type_name,,liquid_color_is_transparent */
$cassandra->createColumnFamily($keyspace,'liquid_color');
/* liquid_color_type_name */
$cassandra->createColumnFamily($keyspace,'liquid_color_type');
/* alcohol_by_volume,alcohol_by_proof_us,alcohol_by_proof_uk */
$cassandra->createColumnFamily($keyspace,'alcohol_sum');
/* drink_ingredient_type_name,drink_ingredient_type_desc */
$cassandra->createColumnFamily($keyspace, 'drink_ingredient_type');